import { toSuccess, useRedis } from "@sker/core";
import { useData } from "@sker/runtime";
import { z } from "zod";
import * as helper from './kwaiHelper';
/**
 * 更新包
 */
export default async () => {
    const input = z.object({
        userId: z.string(),
        online: z.number()
    })
    const body = input.parse(useData())
    await useRedis(0, async (r) => {
        return await helper.kwaiSortJoin(r, body.userId, body.online)
    })
    return toSuccess(true);
}